home *** CD-ROM | disk | FTP | other *** search
- This set of files is a Novell NE2000 ethernet packet driver interface,
- based on the old 3C503 driver. Here are some notes...
-
- 1) Driver type is set to 99, if a type number has been allocated
- it should be changed.
-
- 2) I have implemented multicast filtering. In the process, I
- found a few problems with head.asm, and a modified version
- is enclosed.
-
- 3) The NE2000 responds with a 'W' during initialization, for
- 16 bit mode. If the board will work in 8 bit mode, I have
- not written the code to implement it.
-
- 4) This was tested using Netware SFT and a patched version of
- DECnet-DOS (which uses multicasts), with both running at
- the same time.
-
-
- Dave Horne
- 1/2/1990
-
-
- -------------------------------------------------------------------------------
-
- NE2000B.asm
-
- Here is the next version of the NE2000 driver. It's been modified to
- use the version 5 head.asm and tail.asm, and seems to work OK. There is
- also a modified head.asm included, which is the original head.asm with
- the a modification to the callback mechanism. The callback in
- this version uses some real tacky code to allow either a far return from
- the user code or an interrupt return by:
-
- 1) sets carry off (flags must be an even number)
- 2) pushes 1 ( and odd number !!)
- 3) pushes flags incase an iret is uses
- 4) does far call.
- 5) on return, the flag should be at the top of the stack.
- if the topp of the stack is 1, it cant be the flags
- and so an iret has been uses.
- 6) clean up stack.
-
- Nasty eh ? The reason for this code is to allow programs written in
- Microsoft C to install an interrupt type function as a receive handler.
- In this way, all the register saves and segment setup is taken care of.
-
- Here's an example from a program I wrote:
-
- /* receiver routine. */
-
-
- interrupt far receiver(res,rds,rdi,rsi,rbp,rsp,rbx,rdx,rcx,rax)
- unsigned short res,rds,rdi,rsi;
- unsigned short rbp,rsp,rbx,rdx,rcx,rax;
- {
- char far *buffer;
- switch(rax) /* ax is 0 for get buffer, 1 for read */
- {
- case 0:
- buffer = GetaBuffer(rcx);
- res = FP_SEG( buffer );
- rdi = FP_OFF( buffer);
- break;
- case 1:
- DoRead(rds, rsi);
- break;
- }
-
- }
-
- This routine can be called directly from the packet driver. Without the
- mod to head.asm, you have to
- 1) Write an intermediat assembly language handler, or
- 2) Write assembly language to exit the interrupt handler
- before it returns.
-
-
-
-
-
-
-